// src/services/userService.js
import axios from 'axios';

const apiClient = axios.create({
  baseURL: '/api', // 基础 URL, 调整为后端实际地址
  withCredentials: true,
  headers: {
    'Content-Type': 'application/json',
  }
});

export default {
  logout() {
    return apiClient.post('/logout/');
  },
  changePassword(data) {
    return apiClient.post('/pass_change/', data);
  },
  changeEmail(data) {
    return apiClient.post('/email_change/', data);
  },
  sendVerificationCode(data) {
    return apiClient.post('/send_verification_code/', data);
  },
  updateProfile(data) {
    return apiClient.post('/update_profile/', data);
  }
};